{% if objects %}
{% load thumbnail %}
{% endif %}

{% for s in objects %}
<li>
  <div id="dSmBoxIn">
    <span id="dStore2" >
      <span class="cSClass"><a href="{% url stores %}?q={{ s.category.name }}">{{ s.category.name }}</a></span>
      <a href="{{ s.url }}" target="_blank">{{ s.name }}</a>
    </span>
  </div>
  <div id="dLineBg" class="cBg0">{{ s.representative|safe }}</div>
  <div class="cPhoto">
    {% thumbnail s.thumbnail "270x200" as im %}
    <a href="{{ s.url }}" target="_blank"><img src="{{ im.url }}" /></a>
    {% endthumbnail %}
  </div>
  {% for e in s.get_aevents %}
  <div id="dLineBg" class="cBg0">
    <span class="cEventin">EVENT</span>
    <span class="cvEDescription">
      <a href="{{ e.url }}" target="_blank">{{ e.name }}</a> 
    </span>
  </div>
  {% empty %}
  <div id="dLineBg" class="cBg0">
    <span class="cEventin">EVENT</span>
    <span class="cvEDescription">
      <a href="{{ e.url }}" target="_blank">이벤트가 없습니다.</a> 
    </span>
  </div>
  {% endfor %}
  
  {% if s.addr %}
  <div id="dAddress">
    <a href="{{ s.url }}" target="_blank">{{ s.addr }}</a>
  </div>
  {% endif %}
</li>
{% endfor %}

